<template>
	<view class="main">
	<view class="head">
		<view class="ad-pic">
			<u--image  :src="shopMallImgUrl+'ad-bg.png'" width="750rpx" height="350rpx" @click="click"></u--image>
		</view>
		<view class="ad-list">
			<view class="ad-item" v-for="(item,index) in baseList" :key="index" @tap="jump(item.url)">
				<u-icon
				        :name="shopMallImgUrl+item.icon"
				        :size="50"
				></u-icon>
				<text class="grid-text">{{item.name}}</text>
			</view>
			
		</view>
	</view>	
	<view class="list-box">
		<view class="li">
			<view class="li-left">
				<text class="unit">￥</text>
				<text class="money">3333</text>
			</view>
			<view class="li-right">
				<view class="name">广告红包</view>
				<view class="word">精准曝光2200次</view>
				<view class="buy">购买</view>
			</view>
		</view>
	</view>
	</view>
</template>

<script>
	import {shopMallImgUrl} from "@/common/config.js"
	export default{
		data(){
			return{
				shopMallImgUrl:shopMallImgUrl,
				baseList:[{
					name:"广告红包",
					icon:"ad-3.png",
					url:"/advertise/pages/adRedpacket"
				},{
					name:"曝光次数",
					icon:"ad-1.png",
					url:"/advertise/pages/exposureNumber"
				},{
					name:"门店广告",
					icon:"ad-2.png",
					url:"/advertise/pages/storeAd"
				}]
			}
		},
		onLoad() {
			
		},
		onShow() {
			
		},
		methods:{
			jump(url){
				uni.navigateTo({
					url: url
				});
			}
		}
	}
</script>

<style lang="scss">
	.main{
		background-color: #f7f7f7;
		height: calc(100vh - 44px);
	}
	.head{
		position: relative;
		.ad-list{
			position: absolute;
			width: 690rpx;
			left: 30rpx;
			bottom: -40rpx;
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			.ad-item{
				text-align: center;
				background-color: #fff;
				border-radius: 20rpx;
				box-shadow: #e5e5e5 0 10rpx 10rpx;
				width: 210rpx;
				height: 180rpx;
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				.grid-text{
					font-size: 30rpx;
					color: #333333;
				}
			}
			
		}
	}
	.list-box{
		margin-top: 60rpx;
		.li{
			display: flex;
			flex-direction: row;
			justify-content: flex-start;
			background: url("/static/red-li-bg.png");
			background-position: center;
			background-repeat: no-repeat;
			background-size: 690rpx 200rpx;
			width: 690rpx;
			margin-left: 30rpx;
			height: 200rpx;
			margin-bottom: 30rpx;
			.li-left{
				display: flex;
				flex-direction: row;
				justify-content: flex-start;
				width: 200rpx;
				padding-top: 70rpx;
				padding-left: 20rpx;
				.unit{
					font-size: 30rpx;
					color: #F39D21;
					margin-top: 20rpx;
				}
				.money{
					font-size: 50rpx;
					font-weight: bold;
					color: #F39D21;
				}
			}
			.li-right{
				width: 470rpx;
				position: relative;
				margin-left: 20rpx;
				.name{
					font-size: 36rpx;
					color: #333333;
					margin-top: 50rpx;
					
				}
				.word{
					font-size: 26rpx;
					color: #AAAAAA;
					margin-top: 20rpx;
					text-overflow: -o-ellipsis-lastline;
					  overflow: hidden;
					  text-overflow: ellipsis;
					  display: -webkit-box;
					  -webkit-line-clamp: 2;
					  line-clamp: 2;
					  -webkit-box-orient: vertical;
					
				}
				.buy{
					width: 140rpx;
					height: 60rpx;
					background: linear-gradient(to right,#E15E68,#FFA200);
					font-size: 24rpx;
					color: #fff;
					text-align: center;
					line-height: 60rpx;
					border-top-left-radius: 30rpx;
					border-bottom-left-radius: 30rpx;
					position: absolute;
					right: 0;
					top:40rpx;
				}
			}
		}
	}
	
</style>